﻿using GreenXi.Pages.Power;
using GreenXi.ViewModel;
using System;
using System.Windows;
using System.Windows.Input;

namespace GreenXi.Pages.index
{
    /// <summary>
    /// Decision.xaml 的交互逻辑
    /// </summary>
    public partial class Decision : Window
    {

        public Decision()
        {
            InitializeComponent();
            var decision = new MonitoringViewModel(new Monitoring());
            DataContext = decision;
            if (decision.CloseAction == null)
                decision.CloseAction = new Action(this.Close);

        }
        private void Close_MouseDown(object sender, MouseButtonEventArgs e)
        {
            this.Close();
        }

        //添加判断框
        private void Add_MouseDown(object sender, MouseButtonEventArgs e)
        {

        }
        protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
        {
            base.OnMouseLeftButtonDown(e);
            this.DragMove();
        }


    }
}
